package Text_24;

import java.util.Scanner;

public class Code {

	public static void main(String[] args) {
		//判断一个数是不是质数
				Scanner sc = new Scanner(System.in);
				System.out.println("请输入一个整数：");
				int num = sc.nextInt();
				boolean zh = judge(num);
				System.out.println(zh);

			}
			public static boolean judge( int num) {
				int count = 0;
				for(int i=2;i<=Math.sqrt(num);i++) {
					count++;
					if(num%i==0) {
						return false;
					}
				}
				System.out.println(count);
				return true;
	}

}
